<?php
// check if fields passed are empty
/*if(empty($_POST['name'])  		||
   empty($_POST['phone']) 		||
   empty($_POST['email']) 		||
   empty($_POST['message'])	||
   !filter_var($_POST['email'],FILTER_VALIDATE_EMAIL))
   {
	echo "No arguments Provided!";
	return false;
   }

$name = $_POST['name'];
$phone = $_POST['phone'];
$email_address = $_POST['email'];
$message = $_POST['message'];
	
// create email body and send it	
$to = 'your-email@your-domain.com'; // PUT YOUR EMAIL ADDRESS HERE
$email_subject = "Modern Business Contact Form:  $name"; // EDIT THE EMAIL SUBJECT LINE HERE
$email_body = "You have received a new message from your website's contact form.\n\n"."Here are the details:\n\nName: $name\n\nPhone: $phone\n\nEmail: $email_address\n\nMessage:\n$message";
$headers = "From: noreply@your-domain.com\n";
$headers .= "Reply-To: $email_address";	
mail($to,$email_subject,$email_body,$headers);*/


$to = '"Britanico Merida" <<a href="mailto:britanico@gmail.com">britanico@gmail.com</a>>';
$subject = 'PHP mail tester';
$message = 'This message was sent via PHP!' . PHP_EOL .
    'Some other message text.' . PHP_EOL . PHP_EOL .
    '-- signature' . PHP_EOL;
$headers = 'From: "Vip Otical Canarias" <<a href="mailto:administracion@vipopticalcanarias.com">administracion@vipopticalcanarias.com</a>>' . PHP_EOL .
    'Reply-To: <a href="mailto:administracion@vipopticalcanarias.com">administracion@vipopticalcanarias.com</a>' . PHP_EOL .
    'Cc: "CC Name" <<a href="mailto:cc@email.dom">cc@email.dom</a>>' . PHP_EOL .
    'X-Mailer: PHP/' . phpversion();

if (mail($to, $subject, $message, $headers)) {
    echo 'mail() Success!';
}
else {
    echo 'mail() Failed!';
}